<?php
declare (strict_types = 1);

namespace app;

use think\Service;
use EasyWeChat\OfficialAccount\Application;
use think\facade\Cache;
use think\facade\View;
/**
 * 应用服务类
 */
class AppService extends Service
{
    public function register()
    {
        // 服务注册
    }

    public function boot()
    {
        // 服务启动
        $this->initialize();
    }

    public function initialize()
    {
        // 初始化模块
        $config = config('wechat');
        
        $app = new Application($config);
        // echo json_encode($app);exit;
       
        // echo $jssdk;exit;
        // View::assign('jssdk', $jssdk);
        $this->app->bind('wechat', $app);
    }
}
